home *** CD-ROM | disk | FTP | other *** search
/ PC Format 25 / PCFormat 1993-10.iso / UTILS.ZIP / CHKEXIST.BAT < prev    next >
DOS Batch File  |  1991-03-22  |  543b  |  20 lines

  1. @echo off
  2. if "%1"=="" goto help
  3. if not exist %1 goto no_file
  4. echo %1 is a diskfile
  5. goto end
  6. :no_file
  7. if not exist %1\nul goto no_subdir
  8. if exist %1\*.* echo %1 is a non-empty subdirectory
  9. if not exist %1\*.* echo %1 is an empty subdirectory
  10. goto end
  11. :no_subdir
  12. echo %1 does not exist
  13. goto end
  14. :help
  15. echo CHKEXIST by Jim Groeneveld, NL, 21/3-91.
  16. echo Checks existence (or not) of some name as a disk file or subdirectory.
  17. echo Syntax: CHKEXIST name
  18. echo Output: textual report of existence, adapt for specific purposes.
  19. :end
  20.